#include<stdio.h>
#include<math.h>

int main()
{
    long int n, digits;
    scanf("%ld",&n);
    if(n == 0)
    {
        printf("%ld ",n);
    }
    else
    {
        digits = (long int)log10(n) + 1;
        while(n/10 != 0)
        {
            if((long int)log10(n) != digits-1)
            {
                printf("0 ");
                digits--;
                break;
            }
            printf("%d ",(int)(n/pow(10.0, 1.0*digits-1)));
            n = n%(int)(pow(10.0, 1.0*digits-1));
            digits--;
        }
        printf("%ld ",n);
    }
    
    return 0;
}